<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">

<ui:include src="/WEB-INF/includes/head.xhtml">
    <ui:param name="pageTitle" value="Bought tickets" />
</ui:include>
<h:body>
	<ui:include src="/WEB-INF/includes/menu.xhtml" />
	<h1>Bought tickets</h1>
	<h:form>
		<!-- User tickets table -->
		<p:dataTable var="ticket" value="#{boughtTickets.tickets}">
			<p:column headerText="Trip ID">
				<h:outputText value="#{ticket.tripID}" />
			</p:column>
			<p:column headerText="Route">
				<h:outputText value="#{ticket.routeName}" />
			</p:column>
			<p:column headerText="Departure time">
				<h:outputText value="#{ticket.departureTime}" />
			</p:column>
			<p:column headerText="Departure station">
				<h:outputText value="#{ticket.departureStation}" />
			</p:column>
			<p:column headerText="Arrival time">
				<h:outputText value="#{ticket.arrivalTime}" />
			</p:column>
			<p:column headerText="Arrival station">
				<h:outputText value="#{ticket.arrivalStation}" />
			</p:column>
		</p:dataTable>

	</h:form>

</h:body>
</html>